package dptest;

import java.util.Arrays;

public class t55old {

	public static void main(String[] args) {
		int nums[] = {2,0,0};
		/*if(nums.length == 1) {
			return true;
		}*/
		boolean dp[] = new boolean[nums.length];
		dp[0] = true;
		for(int i = 1 ; i <nums.length;i++) {
			dp[i] = false;
			for(int j = 0 ; j <i; j++) {
				if(i-j<=nums[j] && dp[j]) {
					dp[i] = true;
					break;
				}
			}
		}
	    //return dp[nums.length-1];
		System.out.println(Arrays.toString(dp));

	}

}
